#ifndef MAINCONTENT_H
#define MAINCONTENT_H

#include <QObject>
#include <QtGui>

#include "COFF.h"

class MainContent : public QObject
{
Q_OBJECT
public:
    explicit MainContent(QObject *parent = 0);

    quint32 QuerySymbol(const QString s, quint32 &v);
    void ParseFile(QFile * pfile);

    inline quint32 IterSymbol(QString &s, quint32 &v)
    {
        if(this->iter != this->mapSymTblMain.end())
        {
            s = this->iter.key();
            v = this->iter.value()->sym_val;
            ++iter;
            return 1;
        }
        else
        {
            return 0;
        }
    }

    inline void ResetIter()
    {
        this->iter = this->mapSymTblMain.begin();
    }

    inline quint32 SymbolCnt()
    {
        return this->mapSymTblMain.size();
    }

signals:

public slots:

private:
    QVector<IMAGE_SYMBOL_TABLE> vecISTMain;
    QMap<QString, IMAGE_SYMBOL_TABLE*> mapSymTblMain;
    QMap<QString, IMAGE_SYMBOL_TABLE*>::iterator iter;
};

#endif // MAINCONTENT_H
